package cn.com.manager.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import cn.com.manager.page.PageInfo;
import cn.com.manager.pojo.Demo;
import cn.com.manager.pojo.Menu;
import cn.com.manager.pojo.Role;
import cn.com.manager.pojo.User;
import cn.com.manager.pojo.UserSessionManager;

public interface SystemService {
	
	public User userInfoOfQuery(String username);
	
	/**
	 * 增加新用户
	 * @param user
	 * @return
	 */
	public User addOfUser(User user);

	public Collection<UserSessionManager> getUserSessions();

	public List<Map<String,Object>> searchMenu();

	public List<Menu> searchMenuByLevel(int flag,String id);
	public Menu searchMenuById(String id);
	public int saveMenuInfo(Menu menu);
	public void delMenuInfo(String id);
	
	public int saveRoleInfo(Role role);
	public Role searchRoleById(String id);
	public List<Role> search(Role role,PageInfo pageInfo);
	public int removeRoleInfo(String id);
	
	public List<User> search(User user,PageInfo pageInfo);
	public int removeUserInfo(String id);
	public User searchUserById(String id);
	public int saveUserInfo(User user);
	public void saveUserBindRoles(String userId,String roleIds);
}
